package com.stp.rabbitmq.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 分片文件
 */
@Configuration
public class ShardingFileConfig {
    // 队列名称
    public static final String SHARDING_FILE_QUEUE = "sharding_file_queue";

    @Bean
    public Queue shardingFileQueue() {
        // 默认情况下，创建持久化、不排它、不自动删除的队列
        return QueueBuilder.durable(SHARDING_FILE_QUEUE).build();
    }
}
